<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<script type="text/javascript">
        window.onload = function(){
            var oUl = document.getElementById('ul1');
            var aA = oUl.getElementsByTagName('a');

            
            //通过子节点a找到他的父节点li,点击隐藏按钮，实现隐藏li的样式
            for(var i=0;i<aA.length;i++){
                aA[i].onclick = function(){
                    this.parentNode.style.display = 'none';
                }
            }
           
        }
	</script>
</head>
<body>
  
    <div>

        <ul id="ul1">
            <li>维尔康客服将<a href="#">隐藏</a></li>
            <li>56546555<a href="#">隐藏</a></li>
            <li>dfffdfdfff<a href="#">隐藏</a></li>
            <li>富家大室放大看房<a href="#">隐藏</a></li>
            <li>维尔康客服将<a href="#">隐藏</a></li>
        </ul>
    	
    </div>
	
</body>
</html>